package cn.gx.learn.security_boot_jwt_websocket.aop.dal.date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.type.EnumTypeHandler;

import java.awt.*;
import java.time.LocalDateTime;
import java.util.concurrent.ThreadPoolExecutor;

@Data
@TableName("log")
@Slf4j
@NoArgsConstructor
public class Log {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String description;
    @TableField(value = "type",typeHandler = EnumTypeHandler.class)
    private Menutype type;
    private int status;
    private LocalDateTime createTime;
    public Log(String description) {
        this.description = description;
        this.createTime = LocalDateTime.now();
    }
    public enum Menutype{
        Login,
        WSON,
        WSOUT,
        Logout,
        Message,
        Register,
        APPIONTMENT,
    }




}
